#ifndef __CO_PROC_H__
#define __CO_PROC_H__


#include "Index.h"
#include "2BWTSearch.h"
#include "2BWTSearch_cpu.h"

#include "buffer.h"

void coproc2BWTSearch(unsigned int* Queries, const int numQuery, 
						BWT* bwt, BWT* revbwt,
						const int numCPUThread);
						
void coproc2BWTSearch_simple(unsigned int* Queries, const int numQuery, 
						BWT* bwt, BWT* revbwt,
						const int numCPUThread);

						
uint64 coproc2BWTSearch_simple(unsigned int* Queries, const int numQuery, 
						BWT* bwt, BWT* revbwt,
						const int numCPUThread, 
						uint64 bufSize, uint3* cpuSABuf, uint32* numSA);

void coproc2BWTSearchLimit_simple(unsigned int* Queries, unsigned int* revQueries,
                                                const int numQuery,
                                                BWT* bwt, BWT* revbwt,
                                                const int numCPUThread);						
						
void shuffleQuery(unsigned int* query, 
				const int numQuery, const int querySizeInWord, 
				unsigned int seed = 0) ;


uint64 coproc2BWTSearch_simple(unsigned int* Queries, const int numQuery,
                                BWT* bwt, BWT* revbwt, BWT* d_bwt, BWT* d_revbwt, st_MemoryBuf* GPUMemBuf,
                                const int numCPUThread,
                                uint64 bufSize, uint3* cpuSABuf, uint32* numSA);


uint64 coproc2BWTSearchLimit_simple(unsigned int* Queries, const int numQuery,
                                                BWT* bwt, BWT* revbwt, BWT* d_bwt, BWT* d_revbwt, st_MemoryBuf* GPUMemBuf,
                                                const int numCPUThread,
                                                uint64 bufSize, uint3* cpuSABuf, uint32* numSA);

#endif /*__CO_PROC_H__*/


